<html>
<head><meta charset="utf-8"><title>hot tip: optimize = false is *really* slow · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hot.20tip.3A.20optimize.20.3D.20false.20is.20*really*.20slow.html">hot tip: optimize = false is *really* slow</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="211419630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hot%20tip%3A%20optimize%20%3D%20false%20is%20%2Areally%2A%20slow/near/211419630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hot.20tip.3A.20optimize.20.3D.20false.20is.20*really*.20slow.html#211419630">(Sep 27 2020 at 14:48)</a>:</h4>
<p>I didn't believe the comments until it took over 10 minutes to build <code>core</code> <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span> </p>
<div class="codehilite"><pre><span></span><code># Whether or not to optimize the compiler and standard library.
# WARNING: Building with optimize = false is NOT SUPPORTED. Due to bootstrapping,
# building without optimizations takes much longer than optimizing. Further, some platforms
# fail to build without this optimization (c.f. #65352).
#optimize = true
</code></pre></div>



<a name="211420955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hot%20tip%3A%20optimize%20%3D%20false%20is%20%2Areally%2A%20slow/near/211420955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mati865 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hot.20tip.3A.20optimize.20.3D.20false.20is.20*really*.20slow.html#211420955">(Sep 27 2020 at 15:22)</a>:</h4>
<p>You just need something like top tier Threadripper....</p>



<a name="211430153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hot%20tip%3A%20optimize%20%3D%20false%20is%20%2Areally%2A%20slow/near/211430153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hot.20tip.3A.20optimize.20.3D.20false.20is.20*really*.20slow.html#211430153">(Sep 27 2020 at 19:19)</a>:</h4>
<p>It's not supported but it's still in <code>config.toml</code>?</p>



<a name="211430221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hot%20tip%3A%20optimize%20%3D%20false%20is%20%2Areally%2A%20slow/near/211430221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hot.20tip.3A.20optimize.20.3D.20false.20is.20*really*.20slow.html#211430221">(Sep 27 2020 at 19:20)</a>:</h4>
<p>config.toml has lots of weird knobs to tweak</p>



<a name="211433558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hot%20tip%3A%20optimize%20%3D%20false%20is%20%2Areally%2A%20slow/near/211433558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hot.20tip.3A.20optimize.20.3D.20false.20is.20*really*.20slow.html#211433558">(Sep 27 2020 at 20:39)</a>:</h4>
<p>Just because it's not supported for bootstrap doesn't mean it's not useful for debugging something -- especially if you can make a <code>#[no_core]</code> repro.</p>



<a name="211435879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hot%20tip%3A%20optimize%20%3D%20false%20is%20%2Areally%2A%20slow/near/211435879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hot.20tip.3A.20optimize.20.3D.20false.20is.20*really*.20slow.html#211435879">(Sep 27 2020 at 21:42)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/131828-t-compiler/topic/hot.20tip.3A.20optimize.20.3D.20false.20is.20*really*.20slow/near/211430221">said</a>:</p>
<blockquote>
<p>config.toml has lots of weird knobs to tweak</p>
</blockquote>
<p>I wonder <a href="https://github.com/rust-lang/rust/pull/76625/files">who</a> <a href="https://github.com/rust-lang/rust/pull/76626/files">adds</a> them...</p>



<a name="211435950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hot%20tip%3A%20optimize%20%3D%20false%20is%20%2Areally%2A%20slow/near/211435950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hot.20tip.3A.20optimize.20.3D.20false.20is.20*really*.20slow.html#211435950">(Sep 27 2020 at 21:44)</a>:</h4>
<p>IIRC, I used <code>optimize = false</code> once or twice to debug something, but that was pretty long ago.</p>



<a name="211438848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hot%20tip%3A%20optimize%20%3D%20false%20is%20%2Areally%2A%20slow/near/211438848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hot.20tip.3A.20optimize.20.3D.20false.20is.20*really*.20slow.html#211438848">(Sep 27 2020 at 23:01)</a>:</h4>
<p><span class="user-mention silent" data-user-id="123856">Vadim Petrochenkov</span> <a href="#narrow/stream/131828-t-compiler/topic/hot.20tip.3A.20optimize.20.3D.20false.20is.20*really*.20slow/near/211435879">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/131828-t-compiler/topic/hot.20tip.3A.20optimize.20.3D.20false.20is.20*really*.20slow/near/211430221">said</a>:</p>
<blockquote>
<p>config.toml has lots of weird knobs to tweak</p>
</blockquote>
<p>I wonder <a href="https://github.com/rust-lang/rust/pull/76625/files">who</a> <a href="https://github.com/rust-lang/rust/pull/76626/files">adds</a> them...</p>
</blockquote>
<p>you missed <a href="https://github.com/rust-lang/rust/pull/71994">a</a> <a href="https://github.com/rust-lang/rust/pull/76631">couple</a>  ;)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>